{config_load file="$language/lang.conf" section="categorie_listing"}
<div class="content-block">
	<div class="con-top"><div class="st-left"></div><div class="st-right"></div></div>
	<div class="con-cen">

		<div class="con-cen-cen">
			{if $CATEGORIES_IMAGE}<div class="cat-img"><img src="{$CATEGORIES_IMAGE}" alt="{$CATEGORIES_NAME}" /></div>{/if}
			<div class="{if $CATEGORIES_IMAGE}cat-desc{else}cat-desc2{/if}">
				<h2 class="bold" title="{$CATEGORIES_HEADING_TITLE}">{$CATEGORIES_NAME}</h2>
				{if $CATEGORIES_DESCRIPTION}{$CATEGORIES_DESCRIPTION}{/if}
			</div>
			<div class="clear"></div>
		</div>

	</div>
	<div class="con-foo"><div class="sb-left"></div><div class="sb-right"></div></div>
</div>

{if $module_content !=''}
<div class="content-block">
	<div class="gray-title-top">
		<div class="b-left"></div>
			<span class="bold tsb">Подкатегории</span>
		<div class="b-right"></div>
	</div>
	<div class="con-cen">
		<div class="con-cen-cen">
			{foreach name=aussen item=module_data from=$module_content}
			<div class="cat-two-col {if $smarty.foreach.aussen.iteration % 2 == 0}border-left{/if}">
			{php}$col++;{/php}
				{if $module_data.CATEGORIES_IMAGE}<div class="cat-block-img"><a href="{$module_data.CATEGORIES_LINK}" title="{$module_data.CATEGORIES_NAME}"><img src="{$module_data.CATEGORIES_IMAGE}" alt="{$module_data.CATEGORIES_NAME} {$module_data.CATEGORIES_DESCRIPTION}" /></a></div>{/if}
				<div class="cat-block-info">
					<a class="bold" href="{$module_data.CATEGORIES_LINK}" title="{$module_data.CATEGORIES_NAME}">{$module_data.CATEGORIES_NAME}</a>
					<span class="descr">{$module_data.CATEGORIES_DESCRIPTION}</span>
				</div>
				<div class="clear"></div>
			</div>
{if $smarty.foreach.aussen.iteration+2 gt $smarty.foreach.aussen.total}
		{php}
			// Определям сколько колонок будет на странице
			if ($col>=2) {
				$col=0;
				// Убираем .sep (border_bottom) у последних двух товаров
				echo '<div class="clear"></div>';
			}
		{/php}
{else}
		{php}
			// Определям сколько колонок будет на странице
			if ($col>=2) {
				$col=0;
				echo '<div class="clear sep"></div>';
			}
		{/php}
{/if}
			{/foreach}
		</div>
	</div>
	<div class="con-foo"><div class="sb-left"></div><div class="sb-right"></div></div>
</div>
{/if}
<div class="clear"></div>

{$MODULE_featured_products}
{$MODULE_new_products}